Evaluation manager for 3D animation scenes

ABSTRACT

One embodiment of the invention disclosed herein provides techniques for processing an evaluation graph associated with a three-dimensional animation scene. An evaluation management system retrieves a first plurality of nodes from a memory. The evaluation management system determines that a first node included in the first plurality of nodes depends on a first output generated by a second node that also is included in the first plurality of nodes. The evaluation management system generates a third node corresponding to the first node and a fourth node corresponding to the second node. The evaluation management system generates an evaluation graph that includes the third node, the fourth node, and an indication that the third node depends on the fourth node. The evaluation management system schedules the third node for evaluation after the fourth node has been evaluated.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of the co-pending U.S. patentapplication titled, “EVALUATION MANAGER FOR 3D ANIMATION SCENES,” filedon Apr. 5, 2016 and having Ser. No. 15/091,512, which claims thepriority benefit of U.S. provisional patent application titled,“EVALUATION MANAGER FOR 3D ANIMATION SCENES,” filed on Apr. 15, 2015 andhaving Ser. No. 62/148,109. The subject matter of these relatedapplications is hereby incorporated herein by reference.

BACKGROUND OF THE INVENTION

Field of the Invention

Embodiments of the present invention relate generally tothree-dimensional (3D) computer animation and, more specifically, to anevaluation manager for 3D animation scenes.

Description of the Related Art

In the field of computer animation, the objects in 3D scenes aretypically represented by a directed graph commonly referred to adependency graph. The dependency graph, also referred to as a scenegraph, includes nodes, where each node includes inputs, outputs, andattributes. Typically, a single dependency graph represents the entire3D scene, where the nodes of the dependency graph represent 3D geometryobjects, animation information, light sources, textures, expressions,and so on. Certain nodes in a dependency graph represents a location,such as a joint or muscle, on an object or character in an animation,whose movement can be controlled. During each time step of theanimation, one or more controllers apply forces to the various nodes,causing the associated joints or muscles to move in response. Amongother things, the dependency graph identifies the relationships amongthe different nodes, and, more specifically, defines how specific nodesmove in response to particular movements effected at a given relatednode. For example, a controller could apply a twisting force to a nodecorresponding to the hips of a particular object. The dependency graphwould identify related nodes that also move when the hips of the objectreceive the twisting force. That is, the dependency graph would specifyhow other nodes, corresponding to the legs, arms, upper body, and headof the object, move when a twisting force is applied to the hip node.

After all nodes in the dependency graph are evaluated for a particulartime step, the time advances to the next time step. The nodes in thedependency graph are again evaluated based on the forces applied tovarious nodes at the new time step. By applying forces to the differentnodes at each time step and evaluating the nodes within the dependencygraph at each time step based on those forces, the locations of eachnode in the dependency graph are computed over time. As the differentnodes “move” to those locations over time, the various objects in the 3Dscene are “animated” and appear to move within the 3D scene. In additionto advancing the time step, other changes can cause nodes of thedependency graph to be evaluated. For example, changing the rotationvalue of a joint on an animated character causes the node representingthat joint to be evaluated, along with other nodes that are dependent onthe node representing the joint.

One drawback of using dependency graphs to animate objects in a 3D sceneis that, in general, each node of the dependency graph is evaluatedcompletely at each time step. However, some objects in the 3D scene maynot move as time advances from one time step to the next time stepbecause either the objects are static and do not move, or the objectsare simply not in motion at particular time steps. As a result,processing resources are unnecessarily consumed when nodes that do notmove between time steps are evaluated. Another drawback of usingdependency graphs is that identifying node subsets within the dependencygraph to evaluate in parallel is generally difficult. Consequently, mostnodes within dependency graphs are evaluated in a serial,single-threaded fashion, which results in longer evaluation times whenanimating objects in a 3D scene.

As the foregoing illustrates, what is needed are more effective ways toanimate objects in a 3D scene.

SUMMARY OF THE INVENTION

One embodiment of the present application sets forth a method forprocessing an evaluation graph associated with a three-dimensionalanimation scene. The method includes retrieving a first plurality ofnodes from a memory. The method further includes determining that afirst node included in the first plurality of nodes depends on a firstoutput generated by a second node that also is included in the firstplurality of nodes. The method further includes generating a third nodecorresponding to the first node and a fourth node corresponding to thesecond node. The method further includes generating an evaluation graphthat includes the third node, the fourth node, and an indication thatthe third node depends on the fourth node. The method further includesscheduling the third node for evaluation after the fourth node has beenevaluated.

Other embodiments of the present invention include, without limitation,a computer-readable medium including instructions for performing one ormore aspects of the disclosed techniques, as well as a computing devicefor performing one or more aspects of the disclosed techniques.

At least one advantage of the disclosed techniques is that nodes in adependency graph are evaluated in parallel at a finer granularityrelative to prior approaches. As a result, the time needed to evaluateindependent nodes may be reduced, when scheduled on a multithreadedsystem, leading to faster and more interactive playback and manipulationof animated objects in a 3D scene.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features of the inventioncan be understood in detail, a more particular description of theinvention, briefly summarized above, may be had by reference toembodiments, some of which are illustrated in the appended drawings. Itis to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments.

FIG. 1 illustrates a computing system configured to implement one ormore aspects of the present invention;

FIG. 2 is a block diagram of an evaluation management system that can beimplemented via the computer system of FIG. 1, according to variousembodiments of the present invention;

FIGS. 3A-3C illustrate how groups of nodes included in an evaluationgraph are scheduled, according to various embodiments of the presentinvention;

FIG. 4 illustrates how a group of nodes included in an evaluation graphthat includes a cycle is scheduled, according to various embodiments ofthe present invention;

FIG. 5 illustrates how nodes included in an evaluation graph with pullmode evaluation are scheduled, according to various embodiments of thepresent invention;

FIG. 6 illustrates how groups of nodes included in an evaluation graphare organized into clusters, according to various embodiments of thepresent invention;

FIG. 7 illustrates how the evaluation management system of FIG. 2controls data block caching, according to various embodiments of thepresent invention; and

FIG. 8 is a flow diagram of method steps for processing an evaluationgraph associated with a three-dimensional animation scene, according tovarious embodiments of the present invention.

DETAILED DESCRIPTION

In the following description, numerous specific details are set forth toprovide a more thorough understanding of the present invention. However,it will be apparent to one of skill in the art that embodiments of thepresent invention may be practiced without one or more of these specificdetails.

Hardware Overview

FIG. 1 illustrates a computing system 100 configured to implement one ormore aspects of the present invention. This figure in no way limits oris intended to limit the scope of the present invention. Computingsystem 100 may be a personal computer, video game console, personaldigital assistant, mobile phone, mobile device, or any other devicesuitable for implementing one or more aspects of the present invention.

As shown, computing system 100 includes, without limitation, a processor102, display processor 112, input/output (I/O) bridge 107, and systemmemory 104, coupled together and communicating via a bus path that mayinclude a memory bridge 105. Processor 102 may be any technicallyfeasible form of processing device configured to process data andexecute program code. Processor 112 could be, for example, a centralprocessing unit (CPU), a graphics processing unit (GPU), anapplication-specific integrated circuit (ASIC), a field-programmablegate array (FPGA), and so forth. Likewise, display processor 112 may beany technically feasible form of processing device configured to processdata and execute program code. Display processor 112 could be, forexample, a central processing unit (CPU), a graphics processing unit(GPU), an application-specific integrated circuit (ASIC), afield-programmable gate array (FPGA), and so forth.

Processor 102 and display processor 112 include one or more processingcores. In operation, one or both of processor 102 and display processor112 is the master processor of computing system 100, controlling andcoordinating operations of other system components. System memory 104stores software applications and data for use by processor 102. Eitheror both of processor 102 and display processor 112 execute softwareapplications stored within system memory 104 and optionally an operatingsystem. In particular, either or both of processor 102 and displayprocessor 112 executes software and then performs one or more of thefunctions and operations set forth in the present application. Memorybridge 105, which may be, e.g., a Northbridge chip, is connected via abus or other communication path (e.g., a HyperTransport link) to an I/O(input/output) bridge 107. I/O bridge 107, which may be, e.g., aSouthbridge chip, receives user input from one or more user inputdevices 108 (e.g., keyboard, mouse, joystick, digitizer tablets, touchpads, touch screens, still or video cameras, motion sensors, and/ormicrophones) and forwards the input to processor 102 via memory bridge105.

A display processor 112 is coupled to memory bridge 105 via a bus orother communication path (e.g., a PCI Express, Accelerated GraphicsPort, or HyperTransport link); in one embodiment display processor 112is a graphics subsystem that includes at least one graphics processingunit (GPU) and graphics memory. Graphics memory includes a displaymemory (e.g., a frame buffer) used for storing pixel data for each pixelof an output image. Graphics memory can be integrated in the same deviceas the GPU, connected as a separate device with the GPU, and/orimplemented within system memory 104.

Display processor 112 periodically delivers pixels to a display device110 (e.g., a screen or conventional CRT, plasma, OLED, SED or LCD basedmonitor or television). Additionally, display processor 112 may outputpixels to film recorders adapted to reproduce computer generated imageson photographic film. Display processor 112 can provide display device110 with an analog or digital signal.

A system disk 114 is also connected to I/O bridge 107 and may beconfigured to store content and applications and data for use byprocessor 102 and display processor 112. System disk 114 providesnon-volatile storage for applications and data and may include fixed orremovable hard disk drives, flash memory devices, and CD-ROM, DVD-ROM,Blu-ray, HD-DVD, or other magnetic, optical, or solid state storagedevices.

A switch 116 provides connections between I/O bridge 107 and othercomponents such as a network adapter 118 and various add-in cards 120and 121. Network adapter 118 allows computing system 100 to communicatewith other systems via an electronic communications network, and mayinclude wired or wireless communication over local area networks andwide area networks such as the Internet.

Other components (not shown), including USB or other port connections,film recording devices, and the like, may also be connected to I/Obridge 107. For example, an audio processor may be used to generateanalog or digital audio output from instructions and/or data provided byprocessor 102, system memory 104, or system disk 114. Communicationpaths interconnecting the various components in FIG. 1 may beimplemented using any suitable protocols, such as PCI (PeripheralComponent Interconnect), PCI Express (PCI-E), AGP (Accelerated GraphicsPort), HyperTransport, or any other bus or point-to-point communicationprotocol(s), and connections between different devices may use differentprotocols, as is known in the art.

In one embodiment, display processor 112 incorporates circuitryoptimized for graphics and video processing, including, for example,video output circuitry, and constitutes a graphics processing unit(GPU). In another embodiment, display processor 112 incorporatescircuitry optimized for general purpose processing. In yet anotherembodiment, display processor 112 may be integrated with one or moreother system elements, such as the memory bridge 105, processor 102, andI/O bridge 107 to form a system on chip (SoC). In still furtherembodiments, display processor 112 is omitted and software executed byprocessor 102 performs the functions of display processor 112.

Pixel data can be provided to display processor 112 directly fromprocessor 102. In some embodiments of the present invention,instructions and/or data representing a scene are provided to a renderfarm or a set of server computers, each similar to computing system 100,via network adapter 118 or system disk 114. The render farm generatesone or more rendered images of the scene using the provided instructionsand/or data. These rendered images may be stored on computer-readablemedia in a digital format and optionally returned to computing system100 for display. Similarly, stereo image pairs processed by displayprocessor 112 may be output to other systems for display, stored insystem disk 114, or stored on computer-readable media in a digitalformat.

Alternatively, processor 102 provides display processor 112 with dataand/or instructions defining the desired output images, from whichdisplay processor 112 generates the pixel data of one or more outputimages, including characterizing and/or adjusting the offset betweenstereo image pairs. The data and/or instructions defining the desiredoutput images can be stored in system memory 104 or graphics memorywithin display processor 112. In an embodiment, display processor 112includes 3D rendering capabilities for generating pixel data for outputimages from instructions and data defining the geometry, lightingshading, texturing, motion, and/or camera parameters for a scene.Display processor 112 can further include one or more programmableexecution units capable of executing shader programs, tone mappingprograms, and the like.

Processor 102, render farm, and/or display processor 112 can employ anysurface or volume rendering technique known in the art to generate oneor more rendered images from the provided data and instructions,including rasterization, scanline rendering REYES or micropolygonrendering, ray casting, ray tracing, image-based rendering techniques,and/or combinations of these and any other rendering or image processingtechniques known in the art.

It will be appreciated that the system shown herein is illustrative andthat variations and modifications are possible. The connection topology,including the number and arrangement of bridges, may be modified asdesired. For instance, in some embodiments, system memory 104 isconnected to processor 102 directly rather than through a bridge, andother devices communicate with system memory 104 via memory bridge 105and processor 102. In other alternative topologies display processor 112is connected to I/O bridge 107 or directly to processor 102, rather thanto memory bridge 105. In still other embodiments, I/O bridge 107 andmemory bridge 105 might be integrated into a single chip. The particularcomponents shown herein are optional; for instance, any number of add-incards or peripheral devices might be supported. In some embodiments,switch 116 is eliminated, and network adapter 118 and add-in cards 120,121 connect directly to I/O bridge 107. In addition, in someembodiments, two or more computing systems, such as computing system100, may communicate with one another via a network (not explicitlyshown) to form a distributed computing system. In such embodiments, twoor more computing systems execute software and then perform one or moreof the functions and operations set forth in the present application.

Evaluation Management System for 3D Animation Scenes

Among other things, embodiments of the present invention are directedtowards an approach for generating evaluation graphs based on underlingdependency graphs associated with certain software applications, such asthe Maya® 3D animation from Autodesk®, Inc., modeling, simulation, andrendering software application. Embodiments of the present invention arefurther directed towards an approach for scheduling and evaluating thenodes included in such evaluation graphs. Each evaluation graph is adirected graph that includes a collection of entities connectedtogether, where the connections allow data to move from one entity inthe evaluation graph to another entity. As contrasted with a directedacyclic graph (DAG), an evaluation graph may include cyclic connections.The evaluation graph includes nodes, referred to herein as evaluationgraph nodes, where such nodes are employed for various operations,including, without limitation, model creation, deformation, animation,simulation, and audio processing. A connection between two nodesindicates that one of the two nodes has a dependency on an attribute orother data that resides within the other node. The evaluation graph iseffectively an overlay on top of an underlying dependency graph, as nowdescribed.

When an attribute of a node is changed, the dependency graph isprocessed to determine whether that attribute affects any outputattribute. If the changed attribute affects one or more outputattributes, then each of those output attributes is marked dirty,meaning that the associated cached value is stale and needs to bereevaluated. For each of the output attributes marked as dirty, thedependency graph checks to see if the output attribute is a source for aconnection. If so, then the connection is followed, and the destinationattribute is marked dirty also. This process recurs until all attributesof nodes in the dependency graph which need to be recomputed are markedas dirty. Subsequently, certain events, such as a screen refresh or ananimation playback, cause one or more nodes in the dependency graph tobe reset and reevaluated, based on the nodes that have been marked asdirty. In general, data that is not valid is considered as dirty,otherwise the data is considered clean. For example, if the current timestep changes, all nodes that represent an object that is animated areconsidered dirty, because the data within such nodes contains valuesthat are valid for the previous time step. After these nodes areevaluated for the current time step, the nodes are marked as clean.

Under prior approaches, dirty propagation caused large portions of thedependency graph to be marked as dirty, resulting in re-evaluation of alarge number of nodes on a relatively frequent basis. These priorapproaches also suffered from an inability to effectively determinewhich portions of the dependency graph are independent and, therefore,would benefit from parallel execution on a multithreaded processor. Fordependency graphs that include cycles, prior approaches resolved cyclesat the node level at evaluation time, leading to inconsistent resultsdepending on which node in the cycle is selected to begin evaluation.

With the approaches described herein, an evaluation manager, alsoreferred to herein as an evaluation management system, employs aninnovative evaluation approach to generate a new form of dependencygraph, referred to herein as an evaluation graph. This new evaluationapproach begins when one or more nodes are marked as dirty, therebyinvalidating the current evaluation graph representing the currenttopology. Typically, one or more nodes are marked as dirty when theevaluation identifier (ID) changes, signifying that the time stamp haschanged, or that some other condition has caused one or more nodes to bemarked as dirty. As a result, nodes that are animated between thecurrent time stamp/evaluation ID and the new time stamp/evaluation IDare marked as dirty. Marking such nodes as dirty reflects that theposition and/or other attributes of such nodes may change whentransitioning from the current time stamp/evaluation ID to the new timestamp/evaluation ID. Events other than a change in time step can alsochange the evaluation ID and invalidate the current evaluation graph,thereby stimulating the reevaluation of the nodes in the evaluationgraph. These events include, without limitation, a change in one or morevalues residing in one or more nodes, an instruction in an applicationprogram that marks one or more nodes as dirty, and a script program thatmarks one or more nodes as dirty. When one or more nodes are marked asdirty, the entire current evaluation graph is invalidated. Once thecurrent evaluation graph is invalidated, a new evaluation is requested.This condition triggers a new evaluation, where the nodes of theevaluation graph with an out of date evaluation ID are marked as dirtyand reevaluated.

The evaluation management system also maintains a topology identifier(ID) that changes when the structure, or topology, of the underlyingdependency graph changes, such as when a node is added or removed, or aconnection between nodes is made or broken. In such a condition, thetopology ID changes, causing the topology of the evaluation graph to beinvalidated. This condition doesn't trigger dirty status or evaluation,but rather triggers the rebuilding of a new evaluation graphrepresenting the new topology. A new evaluation graph representing thenew topology is constructed, corresponding to the new topology ID.During construction of the new evaluation graph, if a particular node ispart of the new topology, the node is reset. Resetting the node removesall upstream and downstream dependencies associated with the node.Removing all dependencies prepares the node for connection to the newtopology. The dirty messages associated with the node are processed inorder to reconnect the node to upstream and/or downstream nodes, basedon the new topology. These upstream and downstream nodes are also resetand reconnected to the new topology. The reset/reconnect processcontinues until there are no remaining nodes marked as dirty that arealso part of the new topology. Any remaining nodes are not part of thenew topology, and, therefore, are not accessed during the constructionof the new evaluation graph. Once the new evaluation graph,corresponding to the new topology, is built, the active nodes are markedas dirty to stimulate an initial evaluation of the nodes in the newevaluation grap.

The evaluation graph is then transformed into a scheduling graph,whereby the nodes in the scheduling graph are scheduled for serialevaluation, parallel evaluation, or a combination of serial and parallelevaluation. Evaluation of the nodes in the new evaluation graph involvescomputing new attribute values based on the new evaluation ID and thedependencies represented by the new evaluation graph. Evaluation mayproceed via any technically feasible approach including, withoutlimitation, forward evaluation and push/pull evaluation. Forwardevaluation is a technique for evaluating an evaluation graph, where theevaluation progresses through the evaluation graph by starting from theleaf source nodes, evaluating the leaf source nodes, and pushing theresults to the corresponding destinations. By contrast, push/pullEvaluation, also referred to as reverse evaluation, is a two-phasetechnique for evaluation. In the first phase, referred to as the pushphase, dirty state information is propagated forward through theevaluation graph to tag the values that are out of date. In the secondphase, referred to as the pull phase, a particular output value isrequested causing the corresponding node to retrieve the inputs neededto compute the output. The nodes associated with the needed inputs, inturn, pull on other nodes of the evaluation graph to retrieve furtherinputs needed by the other nodes, and so on. This process continuesthrough the graph as needed in order to fully evaluate the originallyrequested output value. In some embodiments, the push phase may notcapable of being performed when the evaluation management system isactive because propagation of dirty messages is disabled. In theseembodiments, the evaluation management system may identify all nodesthat would otherwise have been subject to a push message during the pushphase, and may mark all such identified nodes as dirty. The pull phasemay then be performed as described above.

Further, the scheduling graph could invoke one or more customevaluators, as further described herein, that modify how evaluationproceeds for any subset of one or more nodes or for the entireevaluation graph. In this manner, the evaluation approach for theevaluation is customizable. Nodes are scheduled for evaluation in such away that organizes access to shared states up front, thereby increasingthe amount of parallel execution relative to prior approaches. Theevaluation management system also generates links between the evaluationgraph and the underlying dependency graph to reduce redundancy andfurther improve efficiency.

FIG. 2 is a block diagram of an evaluation management system 200 thatcan be implemented via the computing system 100 of FIG. 1, according tovarious embodiments of the present invention. In some embodiments, atleast a portion of the evaluation management system 200 may beimplemented via the computing system 100 of FIG. 1. As shown, theevaluation management system 200 includes, without limitation, a centralprocessing unit (CPU) 202, storage 204, an input/output (I/O) devicesinterface 206, a network interface 208, an interconnect 210, and asystem memory 212. The computing system 100 of FIG. 1 can be configuredto implement the evaluation management system 200. The CPU 202, storage204, I/O devices interface 206, network interface 208, interconnect 210,and system memory 212 function substantially the same as described inconjunction with FIG. 1 except as further described below.

The CPU 202 retrieves and executes programming instructions stored inthe system memory 212. Similarly, the CPU 202 stores and retrievesapplication data residing in the system memory 212. The interconnect 210facilitates transmission, such as transmission of programminginstructions and application data, between the CPU 202, input/output(I/O) devices interface 206, storage 204, network interface 208, andsystem memory 212. The I/O devices interface 206 is configured toreceive input data from user I/O devices 222. Examples of user I/Odevices 222 may include one of more buttons, a keyboard, and a mouse orother pointing device. The I/O devices interface 206 may also include anaudio output unit configured to generate an electrical audio outputsignal, and user I/O devices 222 may further include a speakerconfigured to generate an acoustic output in response to the electricalaudio output signal. Another example of a user I/O device 222 is adisplay device that generally represents any technically feasible meansfor generating an image for display. For example, the display devicecould be a liquid crystal display (LCD) display, CRT display, or DLPdisplay. The display device may be a TV that includes a broadcast orcable tuner for receiving digital or analog television signals.

CPU 202 is included to be representative of a single CPU, multiple CPUs,a single CPU having multiple processing cores, and the like. And thesystem memory 212 is generally included to be representative of a randomaccess memory. The storage 204 may be a disk drive storage device.Although shown as a single unit, the storage 204 may be a combination offixed and/or removable storage devices, such as fixed disc drives,floppy disc drives, tape drives, removable memory cards, or opticalstorage, network attached storage (NAS), or a storage area-network(SAN). CPU 202 communicates to other computing devices and systems vianetwork interface 208, where network interface 208 is configured totransmit and receive data via a communications network.

The system memory 212 includes, without limitation, an evaluationmanagement application 230 that further includes a graph generationengine 232, a scheduling evaluation engine 234, an execution engine 236,an evaluation graph 240, dirty propagation data 240, and an evaluationgraph 242.

The graph generation engine 232 generates an evaluation graph bytraversing one or more nodes of a scene and processing dirty propagationmessages during the traversal. As one example, the graph generationengine 232 could generate an evaluation graph based on a scene built viathe Maya 3D animation, modeling, simulation, and rendering software fromAutodesk, Inc.

In general, a dependency graph is a directed graph that includes acollection of entities, referred to herein as nodes, connected by edges.Unlike a directed acyclic graph, a dependency graph can include one ormore cycles, where a set of nodes is connected by edges to form acontinuous loop. Each node in a dependency graph, other than a rootnode, receives one or more data inputs from other nodes. The nodeperforms one or more computations, where each computation may be basedin part on one or more of the inputs to the node. The computationsperformed by a node in an evaluation graph may include, withoutlimitation, computations related to model creation, deformation,animation, simulation, and audio processing. Each node, other than aleaf node, produces one or more outputs as a result of the computationsperformed by the node.

Each connection, or edge, of the dependency graph connects an output ofone node, referred to as a source node, to the input of another node,referred to as a destination node. An edge identifies an input of adestination node that is dependent on a corresponding output of a sourcenode. Taken together, the nodes and edges of the dependency graphidentify the data interdependencies among the nodes of the dependencygraph. The evaluation graph is generated based on the underlyingdependency graph. A primary difference between a dependency graph and anevaluation graph is that a dependency graph node is connected at theinput/output attribute level; whereas, an evaluation graph node istypically connected only at the node level.

When one or more nodes are marked as dirty, the graph generation engine232 invalidates the current evaluation graph. Typically, one or morenodes are marked as dirty when the evaluation identifier (ID) changes,signifying that the time stamp has changed. As a result, nodes that areanimated between the current time stamp/topology ID and the new timestamp/topology ID are marked as dirty. Marking such nodes as dirtyreflects that the position and/or other attributes of such nodes maychange when transitioning from the current time stamp/evaluation ID tothe new time stamp/evaluation ID. Events other than a change in timestamp can change the evaluation ID, thereby invalidating the currentevaluation graph. These events include, without limitation, a change inone or more values residing in one or more nodes, an instruction in anapplication program that marks one or more nodes as dirty, and a scriptprogram that marks one or more nodes as dirty.

In addition, a change in the topology ID indicates that a change in thestructure, or topology, of the underlying dependency graph has occurred,such as when a node is added or removed, or a connection between nodesis made or broken. In such a condition, when the topology ID changes,the topology of the evaluation graph is invalidated. This conditiontriggers the rebuilding of a new evaluation graph representing the newtopology. Once the new evaluation graph has been generated, all nodes inthe new evaluation graph are marked as dirty, thereby stimulating aninitial evaluation of all nodes in the new evaluation graph.

The graph generation engine 232 builds an evaluation graph by simulatinga change for each attribute and input of the dependency graph, one at atime, and monitoring the messages produced by the dirty propagationprocess. The graph generation engine 232 identifies various types ofdependencies, including, without limitation, (1) edge connectionsbetween nodes that identify dependencies between an output of one nodeand an input of another node; (2) intra-node dependencies between inputand output attributes within the same node; (3) complex dependenciesbetween dynamic attributes within one or more nodes; and (4) implicitdependencies between nodes that are not directly specified by thedependency graph.

The graph generation engine 232 generates the evaluation graph based onthe dirty propagation messages for each attribute and input in thedependency graph. The evaluation graph thereby captures more detailedand finer granularity dependency information than identified by thedependency graph. In some embodiments, the evaluation graph may alsocapture dependencies related to reevaluations that may be performed forefficiency sake even when such reevaluations are not specificallyrequested. For example, if a node performs a computation for a motionpath involving an “X” position, then a reevaluation involving the “X”position may cause a reevaluation of the “Y” and “Z” positions for themotion path even if revaluation of the “Y” and “Z” positions is notspecifically required. That is, the “X,” “Y,” and “Z” positions may beefficiently retrieved and reevaluated together even if a particularreevaluation involves only one or two of the positions.

When the structure, or topology, of the underlying dependency graphchanges, such as when a node is added or removed, or a connectionbetween nodes is made or broken, the topology ID changes. In response,the graph generation engine 232 constructs a new evaluation graphrepresenting the new topology, corresponding to the new topology ID.During construction of the new evaluation graph, if a particular node ispart of the new topology, the graph generation engine 232 resets thenode by removing all upstream and downstream dependencies associatedwith the node. Removing all dependencies prepares the node forconnection to the new topology. The graph generation engine 232processes dirty messages associated with the node in order to reconnectthe node to upstream and/or downstream nodes, based on the new topology.The graph generation engine 232 then resets these upstream anddownstream nodes and reconnects these nodes to the new topology. Thegraph generation engine 232 continues to perform the reset/reconnectprocess continues until there are no remaining nodes marked as dirtythat are also part of the new topology. Any remaining nodes are not partof the new topology, and, therefore, the graph generation engine 232does not access these nodes during the construction of the newevaluation graph.

In order to differentiate between different versions of the evaluationgraph, corresponding to different contexts, the graph generation engine232 marks each version of the evaluation graph with an associatedcontext identifier (ID). Prior to an evaluation, the graph generationengine 232 verifies that the context associated with requestedevaluation matches the context of the current evaluation graph. If thecontext of the requested evaluation does not match the context of thecurrent evaluation graph, then the graph generation engine 232identifies the version of the evaluation graph that matches the contextof thee requested evaluation graph prior to the evaluation. If theevaluation graph for the requested context is not generated, the graphgeneration engine 232 builds the evaluation graph for the requestedcontext prior to the evaultion.

The scheduling evaluation engine 234 schedules various groups of nodesfor execution by transforming the evaluation graph into a schedulinggraph. The information stored in the scheduling graph is independentwith respect to the information stored in the evaluation graph. As aresult, the scheduling evaluation engine 234 can generate a newscheduling graph without rebuilding the evaluation graph. Moreparticularly, the scheduling evaluation engine 234 determines whichgroups of nodes can be evaluated in parallel based on the evaluationgraph. The scheduling evaluation engine 234 assigns such groups of nodesto different processing elements with a CPU and or a GPU for parallelexecution. The scheduling evaluation engine 234 also determines whethera particular group of nodes needs to be evaluated prior to another groupof nodes, and schedules such groups of nodes for serial execution.Because the evaluation graph has a complete description of input,output, and attribute dependencies, the scheduling evaluation engine 234schedules nodes for parallel evaluation at a finer granularity relativeto prior approaches and serializes node evaluation only where a truedependency exists. Where possible, the scheduling evaluation engine 234schedules nodes for parallel evaluation via processing cores in the CPUand GPU. In the case of node dependences, the scheduling evaluationengine 234 schedules such nodes for serial evaluation.

Because the scheduling evaluation engine 234 encounters clean dataduring forward processing, the scheduling evaluation engine 234 does nottrigger backward evaluation. If the scheduling evaluation engine 234encounters a dependency in the backward direction, referred to herein aspull model evaluation, then the scheduling evaluation engine 234evaluates the corresponding nodes in a safe mode using serial evaluationand schedules the corresponding nodes for repair in a subsequentgeneration of the evaluation graph. A group of executable instructionsis thread-safe if the group of instructions only manipulates shared datastructures in a manner that guarantees safe execution by multiplethreads at the same time. Thread-safe instruction groups typically onlyaccess data that has been passed to the instruction group from otherthread-safe instruction groups. Examples of groups of executableinstructions that are not thread-safe include groups of instructionsthat access global variables or system resources. The schedulingevaluation engine 234 routes around any nodes that are not thread-safe,forcing such nodes to evaluate serially rather than in parallel. Thescheduling evaluation engine 234 also forms clusters of nodes where suchnodes can be grouped together for evaluation. In particular, if thescheduling evaluation engine 234 detects nodes that form a cycle orloop, the scheduling evaluation engine 234 groups such nodes into aspecial cycle cluster for evaluation.

In some embodiments, the scheduling evaluation engine 234 may schedulenodes in the evaluation graph for evaluation using one or moreexecutors, including, without limitation, serial executors, serialcached executors, and parallel executors. Serial executors may traversethe evaluation graph and may schedule nodes for evaluation serially aseach node is visited from an adjacent node during traversal. Serialcached executors may traverse the evaluation graph, schedule nodes forevaluation serially based on the traversal order of the nodes, and storethe traversal order in a data structure such as a linked list. Duringsubsequent scheduling passes, serial cached executors may schedule nodesfor evaluation in the order specified by the data structure withoutperforming an additional traversal of the nodes in the evaluation graph.

In some embodiments, the scheduling nodes of the scheduling graph maynot be strictly related to the corresponding evaluation nodes in theevaluation graph. In one example, one evaluation node in the evaluationgraph could be replaced by multiple scheduling nodes in the schedulinggraph. In another example, the evaluation of multiple evaluation nodesin the evaluation graph could be replaced by a single scheduling node inthe scheduling graph. Typically, such a scheduling node is referred toas a cluster. In yet another example, the evaluation nodes in theevaluation graph could be used as a general pattern to create thescheduling graph, but the evaluation graph is otherwise ignored whengenerating the scheduling graph. This latter example could be employedto schedule a stock math library to perform calculations andevaluations, rather than an expression node, in cases where expressionnodes could be inherently thread-unsafe.

In some embodiments, when one or more nodes are scheduled as a cluster,the nodes within the cluster may be evaluated via any technicallyfeasible computational approach as an alternative to the standardevaluation approach for nodes that are not included in a cluster. Forexample, any technically feasible runtime evaluation engine could besubstituted for the standard evaluation computational logic. Suchruntime evaluation engines could include, without limitation,MotionBuilder® from Autodesk, Inc., Softimage® from Autodesk, Inc., orHoudini™ from Side Effects Software, Inc. Even though the nodes could beevaluated via such an alternative runtime evaluation engine, the nodeswould still be scheduled via the scheduling techniques described herein.

Stated another way, given a dependency graph describing a scene, thegraph generation engine 232 of the evaluation management system 200generates an evaluation graph based on the dependency graph that definesthe relevant node dependencies for evaluation. The scheduling evaluationengine 234 of the evaluation management system 200 transforms theevaluation graph into a scheduling graph for performing the evaluation.Within each of the scheduling nodes in the scheduling graph, thecorresponding evaluation nodes are evaluated via the standard evaluationapproach described herein, via an alternative runtime evaluation engine,or via any technically feasible combination thereof.

Parallel executors may convert the evaluation graph into a schedulinggraph and may schedule nodes for parallel evaluation where possible.Single nodes in the evaluation graph may be represented by a single nodein the scheduling graph. Groups of nodes in the evaluation graph may begrouped together in a cluster, either for evaluation efficiency or forscheduling groups of nodes that include pull mode evaluation or a cycle.Groups of nodes in a cluster may be represented by multiple nodes in theevaluation graph, but by a single node in the scheduling graph.

In some embodiments, the scheduling evaluation engine 234 may scheduleone or more groups of nodes for evaluation by one or more customevaluators. In general, custom evaluators are runtime processes that canoverride the default evaluation approach for a subgroup of the nodes inthe evaluation graph. When nodes are within a node subgroup associatedwith a particular custom evaluator, that custom evaluator assumesresponsibility for evaluating the nodes within the node subgroup. Suchcustom evaluators may include, without limitation a dynamics evaluator,a prune roots evaluator, a deformer evaluator, a cache evaluator, a nullevaluator, and a disabling evaluator.

In some embodiments, each custom evaluator may be disabled or enabled.If a custom evaluator is disabled, then the nodes associated with thecustom evaluator are evaluated via another custom evaluator or via thestandard evaluation process described herein. More specifically, if acustom evaluator is disabled then the nodes that would have otherwisebeen associated with that custom evaluator are free to be evaluated byother custom evaluators, or by the standard evaluation process. Forexample, if a node is currently evaluated by the cache evaluator, andthe cache evaluator is subsequently disabled, then the node could beevaluated by another custom evaluator, such as the prune rootsevaluator. Alternatively, the node could be evaluated by any otherenabled custom evaluator or by the standard evaluation process. Thecustom evaluators are now described in further detail.

The dynamics evaluator temporarily disables evaluation when nodes of acertain type, referred to as “dynamics” nodes, are present in the scenerepresented by the evaluation graph. Dynamics nodes are not conducive toevaluation via the techniques disclosed herein. Consequently, thedynamics evaluator recognizes whether the evaluation graph includes oneor more dynamics nodes. If one or more dynamics nodes are present, thenthe dynamics evaluator disables standard evaluation to ensure thatdynamics nodes evaluate correctly. In some embodiments, the dynamicsevaluator may evaluate the entire evaluation graph with a dependencygraph push/pull model. As a result, evaluation graphs that includedynamics may not benefit from the performance gains associated with thedisclosed techniques. In some embodiments, the dynamics evaluator mayselectively disable evaluation for dynamics nodes on a node-by-nodebasis. As a result, evaluation graphs that include dynamics nodes maybenefit from the performance gains associated with the disclosetechniques with respect to nodes in the evaluation graph that are notdynamics nodes. In some embodiments, the dynamics evaluator may performan alternative evaluation method that properly evaluates dynamics nodeswithout disable evaluation.

The prune roots evaluator optimizes evaluation by reducing oreliminating the overhead of processing an evaluation graph that includesmany small leaf-level nodes, each with only a single dependency. Suchevaluation graphs are associated with topologies that include smallsimple node networks. In such cases, the scheduling overhead associatedwith the disclosed techniques may exceed the actual evaluationperformance gain. The prune roots evaluator removes the overhead ofscheduling nodes that have no upstream dependencies.

The prune roots evaluator merges each leaf node that has no upstreamdependencies and only a single downstream destination into thedownstream node associated with the node. The prune roots evaluatorperforms the merge operation by creating a cluster containing all mergednodes and scheduling the cluster as a single entity. When the cluster isprocessed, the downstream node is evaluated normally, and the mergedleaf node is evaluated via the pull model. As a final step the clusterevaluator iterates over all merged leaf nodes to properly finishevaluation, which is normally handled by the execution engine 236.

The deformer evaluator performs node evaluation for certain nodes thatinclude complex evaluation processes. Nodes that are relatively simpleto evaluate are typically evaluated via the standard evaluation processdescribed herein. On the other hand, certain nodes are complex toevaluate. One such complex node type is the category of deformer nodes.Deformer nodes specify a deformation function, which is a commonoperation associated with computer animation. Such deformation functionsinclude, without limitation, skinning deformations, blend shapesdeformations, and wrap deformations.

Typically, deformation evaluation involves a significant amount ofcompute resources from the central processing unit. Efficient schedulingof such complex nodes via the disclosed techniques does not appreciablyimprove performance. This result is because the processing resourcesneeded for evaluating this type of node is dominated by the evaluationprocess within the node itself and not by scheduling inefficiencies.

Rather, deformation nodes, and other complex node types, are efficientlyprocessed with a dedicated parallel processor, such as a processorconfigured to perform general purpose processing on a graphicsprocessing unit (GPGPU). A processor with such GPGPU capabilities iscapable to evaluate multiple complex nodes in parallel. The deformerevaluator advantageously leverages the GPGPU capabilities of moderngraphics processors by transferring complex nodes to the graphicsprocessing unit (GPU) for evaluation. Generally, deformer nodes andother complex nodes exist in chains at the leaf level of the evaluationgraph. The output of deformer nodes includes graphics primitives andother shapes that are ready for rendering and display.

The deformer evaluator implements various deformation types and otheroperations via code in a language designed for GPGPU operations, suchas, for example, OpenCL. However, any suitable language designed forGPGPU operations may be used within the scope of the present invention.In some embodiments, the deformer evaluator may convert a methodconfigured to evaluate the node via the CPU into a corresponding GPGPUmethod configured to evaluate the node via the GPU. Typically, theevaluation time is significantly less when a deformer node or othercomplex node is evaluated by the GPU, relative to when the node isevaluated by the CPU.

In some embodiments, performance may be further improved by chainingmultiple deformer nodes together in the evaluation graph. In suchembodiments, the GPU may chain evaluation of the multiple deformer nodestogether without intervention by the CPU. As a result, the data transferbetween the CPU and the GPU is reduced, where such data transfer is atypical in GPGPU programming. In some embodiments, performance may befurther improved writing data resulting from evaluation of the deformernode back into a data block in memory. Rather, the graphics primitivesresulting evaluation of the deformer nodes may be transferred toprocessing elements within the GPU for rendering and display.

The cache evaluator caches animated values associates with nodes in theevaluation graph in a time-indexed stream, and stores the time-indexedstream in a cache. In various embodiments, the cache evaluator may beconfigured to process all nodes in the evaluation graph. Alternatively,the cache evaluator may be configured to process only nodes of one ormore specified types. If a particular node is scheduled for processingby the cache evaluator, then the cache evaluator determines whether theattribute values for the node are present within the cache. If theattribute values for the node are present within the cache, then thecache evaluator copies the values from the cache into the node. If, onthe other hand, attribute values for the node are not present within thecache, then the cache evaluator invokes the execution engine 236 toevaluate the node. The cache evaluator then stores the values for thenode, as computed by the execution engine 236, in the cache.

The null evaluator performs no evaluation function for the respectivenode and, instead, passes evaluation control directly back to theexecution engine 236. In some embodiments, the null evaluator may beinvoked in order to validate that custom evaluator overrides are workingproperly.

The disabling evaluator temporarily disables evaluation of theevaluation graph when nodes of a certain type are present within thescene represented by the evaluation graph. One or more node types may bespecified. If the evaluation graph includes one or more nodes of any ofthe specified types, then the disabling evaluator disables evaluation ofthe evaluation graph. Stated another way, the disabling evaluatorperforms the same function as the dynamics evaluator, but for a specificnode type or node types. By contrast, the dynamics evaluator isspecifically configured to detect dynamics type nodes.

The frozen evaluator identifies nodes that should be tagged to skipevaluation through various configuration settings, and removes suchnodes from the scheduling graph by placing the identified nodes into asingle cluster node that is not evaluated. In one example, somedependency graphs and corresponding evaluation graphs could includeinvisible nodes, where the outputs of such nodes are invisible becausethe output are not currently needed or used for evaluation. In thetraditional push/pull model, the evaluation of such nodes would not betriggered, because the invisible outputs of such nodes would not triggera request for the needed inputs. However, with the evaluation graphapproach described herein, the inputs for such nodes would always beevaluated, regardless of the visibility state, because invisibledownstream nodes would not be able to inform upstream inputs that theinputs do not need to be evaluated. To solve this issue, the frozenevaluator freezes evaluation on invisible nodes by identifying suchnodes, pruning the scheduling graph of such nodes, and placing suchnodes into a single cluster that is not scheduled for evaluation. As aresult, only those nodes whose outputs are actually used are scheduledfor evaluation. In addition, the frozen evaluator may be employed tomodify the configuration of the evaluation sequence.

When scheduling nodes for evaluation, the scheduling evaluation engine234 first schedules node groups that are associated with one or more ofthe custom evaluators described above. The scheduling evaluation engine234 then schedules node groups that include one or more cycles. Finally,the scheduling evaluation engine 234 schedules nodes that are notassociated with any custom evaluators and are not in a cycle.

The execution engine 236 evaluates the groups of nodes according to theassignments determined by the scheduling evaluation engine 234. Becausedirty propagation is disabled, the execution engine 236 encounters cleandata as the execution engine 236 performed evaluation of the nodes. Fornodes and node clusters that can be scheduled for parallel evaluation,the execution engine 236 assigns such nodes and node clusters todifferent processing cores in the CPU and GPU.

Dirty propagation data is disabled during node evaluation. Consequently,the execution engine 236 employs an alternative approach to trackwhether inputs, outputs, or attributes are out of date. Via thealternative approach, the execution engine 236 performs tracking with aseries of evaluation identifiers (IDs). Each evaluation pass is assigneda unique, monotonically increasing master evaluation ID. The executionengine 236 tags each newly generated values for input, output, andattribute value with a slave ID matching the current master ID. Duringsubsequent evaluation passes, the execution engine 236 compares theslave ID of the input, output, and attribute values with the currentmaster ID of the evaluation pass to determine whether the input, output,and attribute values are up to date. If the slave ID is less than thecurrent master ID, then the corresponding input, output, or attribute isout of date and should be reevaluated. The execution engine 236 performsinput, output, and attribute values with the current master ID. If theslave ID is equal to the current master ID, then the correspondinginput, output, or attribute is up to date, and the execution engine 236does not evaluate the input, output, or attribute.

FIGS. 3A-3C illustrate how groups of nodes included in an evaluationgraph are scheduled, according to various embodiments of the presentinvention. In general, the scheduling evaluation engine 234 transformsthe evaluation graph into a scheduling graph by considering thedependencies indicated in the evaluation graph and state sharing amongvarious nodes within the evaluation graph. Typically, with priorapproaches, when multiple nodes share state associated with a scarceresource, a first node acquires access to the state by securing a lockon the state. Once the lock is acquired, the execution engine 236evaluates the first node. Other nodes sharing the state wait for thelock to be released before the other nodes can be evaluated. In themeantime, the other nodes consume processing resources while waiting toacquire a lock. As an alternative to a lock approach, the schedulingevaluation engine 234 schedules nodes in a manner that avoids the use oflocks, thereby alleviating the issues described above. Morespecifically, the scheduling evaluation engine 234 schedules nodes thatshare state in a manner that organizes and serializes access to theshared resources without a need for a lock mechanism. In general, nodesscheduled for evaluation in the serial mode are evaluated one node at atime via the forward evaluation approach. Nodes scheduled for evaluationin the parallel mode are accelerated through computing multiple nodes atthe same time on different threads wherever possible. The nodes arescheduled in a manner so as to avoid collisions by employing variousapproaches, including, without limitation, local serialization, globalserialization, and untrusted execution.

Local serialization involves a scheduling condition where multiple nodesaccess the same common data in the corresponding parent node. Access tothe common data is not locked to a single node at a time. Rather, themultiple nodes are scheduled for serial evaluation, thereby ensuringthat only one node accesses the common data at any given time withoutthe use of a lock. Global serialization involves a scheduling conditionspecifying that no more than one node of a given type can execute at anygiven time. Nodes of other types can be executed in parallel with theseglobally serialized nodes. Untrusted execution involves a schedulingcondition specifying that whenever a node of an untrusted type is beingevaluated, no other nodes can be evaluated at the same time. Thisscheduling condition effectively throttles parallel evaluation into asingle serial path for the duration of the evaluation of the untrustednode. Untrusted scheduling is used when a node can unpredictably accessdata from anywhere in the evaluation graph.

As shown in FIG. 3A, an evaluation graph 300 is transformed into ascheduling graph 310 via local serialization. The scheduling evaluationengine 234 employs local serialization when multiple nodes seek accessto the same shared data, typically from the parent node. The schedulingevaluation engine 234 locally serializes nodes that access a sharedcomponent. The scheduling evaluation engine 234 further schedules nodesthat do not access a shared component, referred to as parallel nodes,for parallel evaluation. As shown, the evaluation graph 300 includes,without limitation, a root node 305, three parallel nodes 307(1-3), andsix local serialization nodes 309(1)-309(6). The arrows in theevaluation graph 300 indicate dependency of one node to another node.For example, both parallel node 307(1) and local serialization node309(1) depend on one or more outputs or attributes from root node 305.Parallel node 307(2) and local serialization nodes 309(2) and 309(4)depend on one or more outputs or attributes from local serializationnode 309(1), and so on.

The scheduling graph 310 includes, without limitation, a root node 315,three parallel nodes 317(1)-317(3), and six local serialization nodes319(1)-319(6), corresponding to the root node 305, parallel nodes307(1)-307(3), and local serialization nodes 309(1)-309(6) of theevaluation graph 300, respectively. The arrows on the scheduling graph310 indicate the evaluation order of the nodes. Local serializationnodes 309(1), 309(2), 309(3), and 309(4) depend on one or more sharedvalues such that only one of local serialization nodes 309(5) and 309(6)can access the shared values at a time. The scheduling graph 310preserves the dependencies shown in the evaluation graph 300. Inaddition, the scheduling graph 310 schedules local serialization nodes319(1), 319(2), 319(3), and 319(4) for serial evaluation so that one onof these four nodes accesses the shared values at any given time.Likewise, local serialization nodes 309(5) and 309(6) depend on one ormore shared values such that only one of local serialization nodes309(5) and 309(6) can access the shared values at a time. Because localserialization nodes 309(5) and 309(6) are already serialized in theevaluation graph 300, local serialization nodes 319(5) and 319(6) arescheduled for serial execution.

As shown in FIG. 3B, an evaluation graph 300 is transformed into ascheduling graph 350 via global serialization. The scheduling evaluationengine 234 globally serializes nodes where only one global serializationnode is allowed to enter a critical section of code execution at a giventime. The scheduling evaluation engine 234 further schedules nodes thatdo not access the critical section of code, referred to as parallelnodes, for parallel evaluation. Although only one global serializationnode is scheduled for evaluation at a time, other nodes, includinglocally serialized nodes and parallel nodes, can be scheduled forevaluation at the same time as a global serialization node. As shown,the evaluation graph 320 includes, without limitation, a root node 325,two parallel nodes 327(1)-327(2), and four global serialization nodes329(1)-329(4). The arrows in the evaluation graph 320 indicatedependency of one node to another node.

The scheduling graph 330 includes, without limitation, a root node 335,two parallel nodes 337(1)-337(2), and four global serialization nodes339(1)-339(4), corresponding to the root node 325, parallel nodes327(1)-327(2), and global serialization nodes 329(1)-329(4) of theevaluation graph 320, respectively. The arrows on the scheduling graph330 indicate the evaluation order of the nodes. The scheduling graph 330preserves the dependencies shown in the evaluation graph 320. Inaddition, the scheduling graph 330 schedules global serialization nodes339(1), 339(2), 339(3), and 339(4) for serial execution, ensuring thatonly one is evaluated at a given time.

As shown in FIG. 3C, an evaluation graph 300 is transformed into ascheduling graph 350 for untrusted evaluation. The scheduling evaluationengine 234 employs untrusted evaluation scheduling when one or morenodes access resources in an unpredictable manner. As one example, anode could be considered as untrusted if the node is configured accessthe node is configured to access any available resource at any giventime. In such cases, the manner in which the node accesses sharedresources would be unpredictable because the scheduling graph 350 cannotpredict in advance the set of resources that the node accesses duringany given time step. As a result, no other node that could be scheduledfor evaluation which such an untrusted node is evaluated. Because thescheduling evaluation engine 234 is unable to fully determinedependencies associated with an untrusted node in advance, thescheduling evaluation engine 234 schedules untrusted nodes forevaluation such that no other node is evaluated is scheduled while anuntrusted node is evaluated. As shown, the evaluation graph 340includes, without limitation, a root node 345, five parallel nodes347(1)-347(5), and two untrusted nodes 349(1)-349(2). The arrows in theevaluation graph 340 indicate dependency of one node to another node.

The scheduling graph 350 includes, without limitation, a root node 355,five parallel nodes 357(1)-357(5), and two untrusted nodes359(1)-359(2), corresponding to the root node 345, parallel nodes347(1)-347(5), and untrusted nodes 349(1)-349(2) of the evaluation graph340, respectively. The arrows on the scheduling graph 350 indicate theevaluation order of the nodes. The scheduling graph 350 preserves thedependencies shown in the evaluation graph 340. In addition, thescheduling graph 350 schedules each of the untrusted nodes 359(1) and359(2) to be evaluated alone, ensuring that no other nodes are scheduledfor evaluation when an untrusted node is scheduled for evaluation.

In various embodiments, the scheduling evaluation engine 234 may employparallel scheduling, local serialization, global serialization, anduntrusted evaluation in any technically feasible combination.

FIG. 4 illustrates how a group of nodes included in an evaluation graphthat includes a cycle is scheduled, according to various embodiments ofthe present invention. As shown, dependency graph 400 includes, withoutlimitation, nodes 402, 404, 406, 412, and 414. Corresponding evaluationgraph 450 includes, without limitation, nodes 452, 454, 456, 462, and464.

Node 414 depends on an output from node 412, while node 412 also dependson an output from node 414, thereby forming a cycle 410. Further, node412 depends on an output from 404, while node 414 depends on outputsfrom node 402. However, neither of nodes 402 and 404 depends on outputsfrom nodes 412 or 414, indicating that nodes 402 and 404 are not withinthe cycle 410. Likewise, node 406 depends on an output from node 414,but neither node 412 nor node 414 depends on an output from node 406,indicating that node 406 is also not within the cycle 410. Because ofthe interdependency of nodes 412 and 414, the scheduling evaluationengine 234 forms a cluster 460 in the dependency graph 450 correspondingto the cycle 410 within the dependency graph 400. The schedulingevaluation engine 234 schedules the cycle 460 to be evaluated as a unitto ensure that the dependency ambiguity does not occur duringevaluation.

FIG. 5 illustrates how nodes included in an evaluation graph with pullmode evaluation are scheduled, according to various embodiments of thepresent invention. As shown, dependency graph 500 includes, withoutlimitation, nodes 502, 504, 506, and 508. Corresponding evaluation graph550 includes, without limitation, nodes 552, 554, 556, and 558.

Node 506 depends on an output from node 504, node 508 depends on anoutput from node 506, and node 504 depends on outputs from nodes 502 and508. In addition, node 502 employs pull model evaluation with respect tonode 504, as indicated by arrow 510. When generating the correspondingevaluation graph 550, the scheduling evaluation engine 234 schedulesnode 554 to evaluate on a different branch from nodes 556 and 558. Node554 and nodes 556 and 558 evaluate serially with respect to node 552.The scheduling evaluation engine 234 detects the invocation of the pullmodel evaluation between nodes 502 and 504, which typically indicates ascheduling error in the dependency graph 500. As a result, whengenerating the corresponding evaluation graph 550, the schedulingevaluation engine 234 schedules node 554 to evaluate on a differentbranch from nodes 556 and 558. Node 554 and nodes 556 and 558 evaluateserially with respect to node 552.

FIG. 6 illustrates how groups of nodes included in an evaluation graphare organized into clusters, according to various embodiments of thepresent invention. As shown, dependency graph 600 includes, withoutlimitation, root node 602, node 604, and node groups 610, 612, 614, and616. The nodes in node groups 610, 612, 614, and 616 may be groupedtogether due to a cycle or a pull model evaluation within the nodegroup. Alternatively, the nodes in node groups 610, 612, 614, and 616may be grouped together for efficient evaluation. The schedulingevaluation engine 234 forms clusters 660, 662, 664, and 666 in thescheduling graph 650 corresponding to node groups 610, 612, 614, and616, respectively. Nodes within a particular cluster 660, 662, 664, and666 are scheduled to be evaluated as a unit. In this manner, clusters660, 662, 664, and 666 are evaluated as if a cluster 660, 662, 664, and666 is a single node. Nodes within a cluster 660, 662, 664, and 666 areevaluated in any technically feasible manner. The scheduling evaluationengine 234 may form clusters and remove existing clusters during anyscheduling evaluation pass. In addition, a cluster may be merged withone or more other nodes or clusters, forming a new cluster that includesthe merged elements.

FIG. 7 illustrates how the evaluation management system 200 of FIG. 2controls data block caching, according to various embodiments of thepresent invention. As shown, the evaluation graph 700 includes, withoutlimitation, a static portion 710 and a dynamic portion 720. Nodes 712and 714 of the static portion 710 represent those portions of the 3Dscene that do not move or animate over time. In the static portion 710,the values for the nodes do not change as the 3D scene is animated. Thatis, the evaluation for nodes 712 and 714 are not dependent on the timestep. Nodes 722, 724, 726, 728 and 730 of the dynamic portion 720represent those portions of the 3D scene that move or animate over time.That is, the evaluation for nodes 722, 724, 726, 728 and 730 aredependent on the time step.

Because nodes 712 and 714 are in the static portion 710, the inputs,outputs, and attributes associated with nodes 712 and 714 do not changeover time. Consequently, nodes 712 and 714 may be evaluated once, andthe resulting data blocks may be stored, or cached, at the output 730 ofnode 714 for future evaluation passes. The execution engine 236 therebyavoids multiple evaluation of nodes 712 and 714 in the static portion710 of the evaluation graph 700, leading to improved performance. Thisprocess is referred to as data block caching. Data block caching mayalso be used within the dynamic portion 720 of the evaluation graph 700where two nodes 728 and 730 are both dependent on the same output 740 ofnode 726. With data block caching, node 726 may be evaluated once, andthe resulting data block may be stored, or cached, at the output 740 ofnode 726. As a result, the data block is available for both nodes 728and 730 when the execution engine 236 evaluates nodes 728 and 730.

FIG. 8 is a flow diagram of method steps for processing an evaluationgraph associated with a three-dimensional animation scene, according tovarious embodiments of the present invention. Although the method stepsare described in conjunction with the systems of FIGS. 1-7, personsskilled in the art will understand that any system configured to performthe method steps, in any order, is within the scope of the presentinvention.

As shown, a method 800 begins at step 802, where a graph generationengine 232 generates an evaluation graph based on dirty propagationdata. The graph generation engine 232 generates a new evaluation graphif no evaluation graph yet exists or if the current evaluation graph isinvalidated. The graph generation engine 232 generates the evaluationgraph by traversing the nodes that are included in the new topology andby monitoring dirty propagation data, typically in the form of dirtypropagation messages.

At step 804, a scheduling evaluation engine 234 transforms theevaluation graph into a scheduling graph. In general, a one-to-onecorrespondence between the nodes of the evaluation graph and thescheduling graph. The scheduling graph preserves the dependencies of theevaluation graph, and also schedules locally serialized, globallyserialized, and untrusted nodes for evaluation. More specifically,scheduling graph preserves the dependencies that appear at the level ofthe scheduling graph nodes. In one example, a scheduling node, such as acluster, could include multiple evaluation graph nodes within the singlescheduling node. In such cases, the scheduling node would be free toeither preserve or ignore the dependencies of the evaluation nodeswithin the cluster in order to properly evaluate the individualevaluation nodes within the scheduling node. Further, the schedulinggraph may specify one or more custom evaluators for evaluating certainnode groups. Further, some node groups may be organized into a cluster,where the nodes in the cluster are evaluated as if the cluster is asingle node.

At step 806, an execution engine 236 evaluates the nodes according tothe schedule defined by the scheduling graph. At step 808, the executionengine 236 detects a change in the evaluation ID, indicating that a newscheduling and evaluation pass should be performed. The evaluation IDmay change in response to a change in the time step or that some othercondition has caused one or more nodes to be marked as dirty. At step810, the graph generation engine 232, invalidates the current evaluationgraph. At step 812, the execution engine 236 determines whether thetopology of the dependency graph has changed. The execution engine 236determines that the topology of the dependency graph has changed bydetermining that the topology ID has changed. In general, the topologyID changes in response changes in the structure, or topology, of theunderlying dependency graph, such as when a node is added or removed, ora connection between nodes is made or broken. If the topology of thedependency graph has changed, then the method 800 proceeds to step 814,where the graph generation engine 232, invalidates the currentevaluation graph topology. The method 800 then proceeds to step 802,described above, to generate a new evaluation graph based on the changeto the topology of the evaluation graph.

Returning to step 812, if the topology of the dependency graph has notchanged, then the method 800 proceeds to step 804, described above forscheduling and evaluating the nodes in the evaluation graph.

In sum, an evaluation management system that includes various executableengines traverses a dependency graph associated with objects in a 3Danimation scene. The graph generation engine traverses the nodes of anevaluation graph and logs dirty propagation messages transmitted duringthe traversal. The dirty propagation messages indicate which nodes aredependent on each other and how the node dependencies areinterconnected. The graph generation engine builds an evaluation graphbased on the logged dirty propagation messages. The schedulingevaluation engine schedules various groups of nodes for execution. Moreparticularly, the scheduling evaluation engine determines which groupsof nodes can be evaluated in parallel based on the evaluation graph. Thescheduling evaluation engine assigns such groups of nodes to differentprocessing elements with a CPU and or a GPU for parallel execution. Thescheduling evaluation engine also determines whether a particular groupof nodes needs to be evaluation prior to another group of nodes, andschedules such groups of nodes for serial execution. The executionengine evaluates the groups of nodes according to the assignmentsdetermined by the scheduling evaluation engine. The graph update enginetracks changes in the topology of the objects in the 3D scene from onetime step to the next time step and propagates the topology changes tothe dependency graph for the next evaluation cycle. In addition, theevaluation management system properly analyzes, schedules, and evaluatesgroups of nodes that include a cycle or loop, as well as groups of nodesto be evaluated by one or more custom evaluators.

At least one advantage of the disclosed techniques is that nodes in adependency graph are evaluated in parallel at a finer granularityrelative to prior approaches. As a result, the time needed to evaluateindependent nodes may be reduced, when scheduled on a multithreadedsystem, leading to faster and more interactive playback and manipulationof animated objects in a 3D scene. Another advantage of the disclosedtechniques is that cycles formed by two or more nodes are correctlyevaluated. In particular, nodes that form a cycle are grouped into acluster, where the cluster is evaluated as if the cluster were a singlenode. As a result, clusters that include a cycle are correctly evaluatedeven if such clusters are evaluated in parallel with other nodes orclusters, leading to more robust evaluation of the dependency graphnodes.

The descriptions of the various embodiments have been presented forpurposes of illustration, but are not intended to be exhaustive orlimited to the embodiments disclosed. Many modifications and variationswill be apparent to those of ordinary skill in the art without departingfrom the scope and spirit of the described embodiments.

Aspects of the present embodiments may be embodied as a system, methodor computer program product. Accordingly, aspects of the presentdisclosure may take the form of an entirely hardware embodiment, anentirely software embodiment (including firmware, resident software,micro-code, etc.) or an embodiment combining software and hardwareaspects that may all generally be referred to herein as a “circuit,”“module” or “system.” Furthermore, aspects of the present disclosure maytake the form of a computer program product embodied in one or morecomputer readable medium(s) having computer readable program codeembodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

Aspects of the present disclosure are described above with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of thedisclosure. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, enable the implementation of the functions/acts specified inthe flowchart and/or block diagram block or blocks. Such processors maybe, without limitation, general purpose processors, special-purposeprocessors, application-specific processors, or field-programmableprocessors or gate arrays.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

While the preceding is directed to embodiments of the presentdisclosure, other and further embodiments of the disclosure may bedevised without departing from the basic scope thereof, and the scopethereof is determined by the claims that follow.

What is claimed is:
 1. A computer-implemented method, comprising:determining that a first node included in a first plurality of nodesdepends on a first output generated by a second node that also isincluded in the first plurality of nodes; and generating an evaluationgraph associated with a three-dimensional animation scene that includesa third node corresponding to the first node, a fourth nodecorresponding to the second node, and an indication that the third nodedepends on the fourth node.
 2. The method of claim 1, further comprisingscheduling the third node for evaluation after the fourth node has beenevaluated.
 3. The method of claim 1, further comprising: determiningthat a fifth node that also is included in the first plurality of nodesdoes not depend on the first node; generating a sixth node correspondingto the fifth node; modifying the evaluation graph to include the sixthnode in the evaluation graph; and scheduling the sixth node forevaluation in parallel with the third node.
 4. The method of claim 1,further comprising: determining that both the first node and a fifthnode that also is included in the first plurality of nodes areconfigured to access a common resource; generating a sixth nodecorresponding to the fifth node; modifying the evaluation graph toinclude the sixth node in the evaluation graph; and scheduling the sixthnode for evaluation serially with the third node.
 5. The method of claim1, further comprising: determining that the first node is configured toaccess one or more common resources in an unpredictable manner; andscheduling no other nodes included in the evaluation graph forevaluation in parallel with the third node.
 6. The method of claim 1,further comprising: determining that the second node is configured torequest attribute information from the first node; and forming a nodecluster that includes both the third node and the fourth node.
 7. Themethod of claim 6, further comprising scheduling the node cluster forevaluation as if the node cluster were a single node.
 8. The method ofclaim 6, further comprising scheduling the first node and the secondnode for push/pull evaluation.
 9. The method of claim 6, wherein thefourth node is configured to not request attribute information from thethird node.
 10. The method of claim 6, further comprising: selecting afirst runtime evaluation engine from a plurality of runtime evaluationengines; and evaluating the third node and the fourth node via the firstruntime evaluation engine.
 11. A non-transitory computer-readable mediumincluding instructions that, when executed by a processor, cause theprocessor to perform that steps of: determining that a first nodeincluded in a first plurality of nodes depends on a first outputgenerated by a second node that also is included in the first pluralityof nodes; generating a third node corresponding to the first node and afourth node corresponding to the second node; and generating anevaluation graph associated with a three-dimensional animation scenethat includes the third node, the fourth node, and an indication thatthe third node depends on the fourth node.
 12. The non-transitorycomputer-readable medium of claim 11, further comprising scheduling thethird node for evaluation after the fourth node has been evaluated. 13.The non-transitory computer-readable medium of claim 11, furthercomprising: determining that a fifth node that also is included in thefirst plurality of nodes does not depend on the first node; generating asixth node corresponding to the fifth node; modifying the evaluationgraph to include the sixth node in the evaluation graph; and schedulingthe sixth node for evaluation in parallel with the third node.
 14. Thenon-transitory computer-readable medium of claim 11, further comprising:determining that both the first node and a fifth node that also isincluded in the first plurality of nodes are configured to access acommon resource; generating a sixth node corresponding to the fifthnode; modifying the evaluation graph to include the sixth node in theevaluation graph; and scheduling the sixth node for evaluation seriallywith the third node.
 15. The non-transitory computer-readable medium ofclaim 11, further comprising: determining that the first node isconfigured to access one or more common resources in an unpredictablemanner; and scheduling no other nodes included in the evaluation graphfor evaluation in parallel with the third node.
 16. The non-transitorycomputer-readable medium of claim 11, further comprising: determiningthat the second node is configured to request attribute information fromthe first node; and forming a node cluster that includes both the thirdnode and the fourth node.
 17. The non-transitory computer-readablemedium of claim 16, further comprising scheduling the node cluster forevaluation as if the node cluster were a single node.
 18. Thenon-transitory computer-readable medium of claim 16, further comprisingscheduling the first node and the second node for push/pull evaluation.19. The non-transitory computer-readable medium of claim 16, wherein thefourth node is configured to not request attribute information from thethird node.
 20. The non-transitory computer-readable medium of claim 16,further comprising: selecting a first runtime evaluation engine from aplurality of runtime evaluation engines; and evaluating the third nodeand the fourth node via the first runtime evaluation engine20.
 21. Asystem, comprising: a memory that includes instructions; and a processorthat is coupled to the memory and, when executing the instructions, isconfigured to perform the steps of: determining that a first nodeincluded in a first plurality of nodes depends on a first outputgenerated by a second node that also is included in the first pluralityof nodes; generating a third node corresponding to the first node and afourth node corresponding to the second node; and generating anevaluation graph associated with a three-dimensional animation scenethat includes the third node, the fourth node, and an indication thatthe third node depends on the fourth node.
 22. The system of claim 21,wherein the processor is further configured to perform the step ofscheduling the third node for evaluation after the fourth node has beenevaluated.